home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Sample Apps / CPlusSample / Makefile
Encoding:
Makefile  |  1996-11-19  |  3.4 KB  |  101 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        Makefile
  3. #
  4. #    Contains:    This makefile creates CPlusSampleLibrary and its client
  5. #                application called CPlusSample.
  6. #    
  7. #                Build Command: BuildProgram CPlusSample
  8. #
  9. #    Copyright:    © 1993-1995 by Apple Computer, Inc., all rights reserved.
  10. #
  11. #
  12.  
  13. SRC     = :Sources:
  14. OBJ        = :Objects:
  15. BLT        = :Built:
  16.  
  17. SLMCIncludes    = {SLMInterfaces}CIncludes:
  18. SLMRIncludes    = {SLMInterfaces}RIncludes:
  19.  
  20. #————————————————————————————————————————————————————————————————————————————————————
  21. #    TARGETS
  22. #————————————————————————————————————————————————————————————————————————————————————
  23.  
  24. TARGETS         =    "{OBJ}SampleLibrary.cl.o" ∂
  25.                     "{BLT}CPlusSampleLibrary" ∂
  26.                     "{BLT}CPlusSample"
  27.  
  28. #————————————————————————————————————————————————————————————————————————————————————
  29. #    DEFAULT RULES
  30. #————————————————————————————————————————————————————————————————————————————————————
  31.  
  32. .cp.o    ƒ    .cp
  33.     Echo "∂t∂tCompiling {Default}.cp"
  34.         CPlus {DepDir}{Default}.cp -o {Targ} {CPlusOptions}
  35.  
  36. #————————————————————————————————————————————————————————————————————————————————————
  37. #    COMPILER/ASSEMBLER OPTIONS
  38. #————————————————————————————————————————————————————————————————————————————————————
  39.  
  40. AOptions          =     -model far -case on
  41. COptions         =     -model far -i {SRC} -mbg on -sym full,nolines -mf -b2 -opt full ∂
  42.                        -i "{SLMCIncludes}"
  43. CPlusOptions     =     -model far -i {SRC} -mbg on -sym full,nolines -mf -b2 -opt full ∂
  44.                        -w1 -z15 -z17 -i "{SLMCIncludes}"
  45.  
  46. #————————————————————————————————————————————————————————————————————————————————————
  47. #    DEPENDENCIES
  48. #————————————————————————————————————————————————————————————————————————————————————
  49.  
  50. "{OBJ}"            ƒ     "{SRC}"
  51. CPlusSample        ƒ     {TARGETS}
  52.  
  53. #————————————————————————————————————————————————————————————————————————————————————
  54. #    CREATE SAMPLE SHARED LIBRARY
  55. #————————————————————————————————————————————————————————————————————————————————————
  56.  
  57. "{OBJ}SampleLibrary.cl.o" ƒ "{OBJ}SampleLibrary.RSRC"
  58.     SetFile -m . {Targ}
  59.  
  60. "{OBJ}SampleLibrary.RSRC" ƒ "{OBJ}SampleLibrary.cp.o" "{SRC}SampleLibrary.exp"
  61.     BuildSharedLibrary ∂
  62.         {OBJ}SampleLibrary.cp.o ∂
  63.         -macsbug -cfront ∂
  64.         -lib "{OBJ}SampleLibrary.RSRC" ∂
  65.         -obj "{OBJ}CPlusSampleLibrary" ∂
  66.         -far "{OBJ}SampleLibrary.cl.o" ∂
  67.         -exp "{SRC}SampleLibrary.exp" ∂
  68.         -i "{SRC}" -i "{SLMCIncludes}" -i "{CIncludes}" -p ∂
  69.         "{OBJ}SampleLibrary.cl.o" ∂
  70.         "{SLMLibraries}CFrontLibraries:LibraryManager.o" ∂
  71.         "{Libraries}Runtime.o"
  72.  
  73. "{BLT}CPlusSampleLibrary"     ƒ {SRC}SampleLibrary.h {OBJ}SampleLibrary.cp.o {OBJ}SampleLibrary.RSRC
  74.     Echo "∂t∂tRezzing {Targ}"
  75.     Rez -t libr -c OMGR -s "{OBJ}" ∂
  76.         -i "{SLMRIncludes}" -i "{SRC}" ∂
  77.         -o {Targ} "{SRC}SampleLibrary.r"
  78.     SetFile -a ib {Targ}
  79.  
  80. #————————————————————————————————————————————————————————————————————————————————————
  81. #    CREATE SAMPLE APPLICATION(CLIENT)
  82. #————————————————————————————————————————————————————————————————————————————————————
  83.  
  84. "{BLT}CPlusSample"    ƒƒ {SRC}Sample.h {OBJ}Sample.cp.o {OBJ}SampleLibrary.cl.o
  85.     Echo "∂t∂tLinking {Targ}"
  86.     Link -w -model far ∂
  87.         "{OBJ}Sample.cp.o" ∂
  88.         "{SLMLibraries}CFrontLibraries:LibraryManager.o" ∂
  89.         "{Libraries}Interface.o" ∂
  90.         "{Libraries}Runtime.o" ∂
  91.         "{OBJ}SampleLibrary.cl.o" ∂
  92.         -o {Targ}
  93.     SetFile {Targ} -t APPL -c 'MOOS' -a B
  94.  
  95. "{BLT}CPlusSample"    ƒƒ {SRC}Sample.h {SRC}Sample.r {OBJ}Sample.cp.o {OBJ}SampleLibrary.cl.o
  96.     Echo "∂t∂tRezzing {Targ}"
  97.     Rez -i "{SRC}" -rd -o {Targ} "{SRC}"Sample.r -append
  98.  
  99. "{OBJ}SampleLibrary.cp.o" ƒ "{SRC}SampleLibrary.h"
  100. "{OBJ}Sample.cp.o"           ƒ "{SRC}SampleLibrary.h" "{SRC}Sample.h"
  101.